<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>

<sql:setDataSource var="dataSource" driver="com.mysql.jdbc.Driver"
                   url="jdbc:mysql://localhost:3306/avaliacao1" user="root" password="root" scope="session"/>
<c:set var="idDisciplina" value="${param.idDisciplina}"/>
<sql:query var="alunos" dataSource="${dataSource}">
    select p.nome from notas n, aluno a, pessoa p where p.idPessoa = a.idPessoa and a.IdAluno = n.idAluno and n.idDisciplina = ${idDisciplina}
</sql:query>
    <h1></h1>
    <table border="1">
        <tr>
            <td>Nome do Aluno:</td>
            <td>Nota</td>
        </tr>
        <tr>
            <c:forEach var="aluno" items="${alunos.rows}">
                <td><c:out value="${aluno.nome}"/></td>
                <td>Nota:<input type="text" name="txtNota" size="5" /></td>
            </c:forEach>
        </tr>
    </table>